<div class = "pt-set-wrap">
    <div class = "pt-set-box">
        <div class = "pt-tab">
            <div class = "pt-tab-nav">
                <a href = "#" class = "current"><span>基本信息</span></a>
                <a href = "#"><span>附加信息</span></a>
            </div>
            <div class = "pt-tab-content">
                <form action = "{link='admin.article.update'}" method = "post" enctype = "multipart/form-data" id = "form">
                    
                    <div class = "pt-tab-item">
                        <div class = "pt-set-content">
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>邮箱：</b>
                                    <input name = "email" type = "text" value = "{$info.email}" class = "input-text w450" />
                                </div>
                            </div>
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>姓名：</b>
                                    <input name = "name" type = "text" value = "{$info.name}" class = "input-text w450" />
                                </div>
                            </div>
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>个人主页：</b>
                                    <input name = "siteurl" type = "text" value = "{$info.siteurl}" class = "input-text w450" />
                                </div>
                            </div>
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>{$typename}内容：</b>
                                    <textarea name = "content" class = "input-box simditorarea" style = "width:740px;height:250px;">{$info.content}</textarea>
                                </div>
                            </div>
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>回复时间：</b>
                                    <input name = "admin_datetime" type = "text" value = "{$pt.now_time|date='Y-m-d H:i:s'}" class = "input-text w450 datetime" />
                                </div>
                            </div>
                            <div class = "pt-set-info">
                                <div class = "line">
                                    <b>回复{$typename}内容：</b>
                                    <textarea name = "admin_content" class = "input-box simditorarea" style = "width:740px;height:250px;">{$info.admin_content}</textarea>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                    <div class = "pt-tab-button">
                        <div class = "pt-set-info">
                            <div class = "line">
                                <b></b>
                                <input type = "hidden" name = "id" value="{$info.id}"/>
                                <input class = "btn btn-success" type = "submit" value = " {$actionname} " />&nbsp;&nbsp;&nbsp;
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class = "f-clear"></div>
    </div>
</div>
<script type = "text/javascript" src = "__PUBLIC__/plugin/validator/jquery.validator.js"></script>
<script type = "text/javascript" src = "__PUBLIC__/plugin/datepicker/WdatePicker.js"></script>
{include file="/template/default/common/simditor.html"}
<script type = "text/javascript">
    $(function () {
        $('#form').validator({
            stopOnError: true,
            timely: 2,
            fields: {
                "category_id": {
                    rule: "required",
                    tip: "请选择{$typename}分类信息!",
                    msg: {
                        required: "请选择{$typename}分类信息!"
                    }
                },
                "title": {
                    rule: "required",
                    tip: "请输入{$typename}标题",
                    msg: {
                        required: "{$typename}标题必填!"
                    }
                }
            },
            //验证成功
            valid: function (form) {
                var sbtn=$('input[type=submit]');
                sbtn.val('正在提交......').attr('disabled','disabled');
                $.ajax({
                    url: $(form).attr('action'),
                    type: 'POST',
                    data: $(form).serialize(),
                    success: function (res) {
                        sbtn.val('{$actionname}').removeAttr('disabled');
                        if (res.status) {
                            $.admin.tool.successtip('修改{$typename}成功', $('input[type=submit]'),res.url);
                        } else {
                            $.admin.tool.errortip('修改{$typename}失败！'+ res.info, $('input[type=submit]'));
                        }
                    }
                });
            }
        });
    });
</script>